<?php

namespace App\Http\Controllers;

use App\Activity;
use App\User;
use Illuminate\Http\Request;

class ProfilesController extends Controller
{
    //

    public function show(User $user){

        /*$activities = $user->activity()->latest()->with('subject')->take(50)->get()
        ->groupBy(function ($activity){
            return $activity->created_at->format('Y-m-d');
        });*/
        return view('profiles.show',[
            'profileUser'=>$user,
//            'threads' =>$user->threads()->paginate(10),
            'activities' =>Activity::feed($user),
        ]);
    }
}
